package com.zmn.plat.dubbo.interfaces.plat;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

import com.zmn.common.dto2.ResponseDTO;

import com.zmn.plat.common.dto.plat.servcategory.PlatServCategoryDRO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import java.util.List;

/**
 * 平台开通分类dubbo接口
 *
 * @author tanghongjun
 * @version v1.0
 * @since 2020-5-18
 */
@Api(value = "平台开通分类服务", tags = {"平台开通分类"})
public interface PlatServCategoryListRemoteService {

    /**
     * 根据平台和服务分类ID，前台二级产品分类ID查询平台是否开通了对应分类
     *
     * @param plat
     *            平台
     * @param servCategId
     *            服务分类
     * @param showCategTwoId
     *            前台二级分类
     * @return true 已开通， false 未开通
     */
    @ApiOperation(value = "根据平台和服务分类ID，前台二级产品分类ID查询平台是否开通了对应分类", response = String.class, tags = {"开通分类"})
    ResponseDTO<Boolean> checkOpenCategByPlatAndCateg(@NotNull(message = "plat不能为空") @Positive(message = "plat必须为大于0的正整数") @ApiParam(value = "平台", required = true) Integer plat,
        @NotNull(message = "servCategId不能为空") @Positive(message = "servCategId必须为大于0的正整数") @ApiParam(value = "服务分类", required = true) Integer servCategId,
        @NotNull(message = "showCategTwoId不能为空") @Positive(message = "showCategTwoId必须为大于0的正整数") @ApiParam(value = "前台二级分类", required = true) Integer showCategTwoId);

    /**
     * 根据平台查询开通分类及名称
     * @param plat
     * @return
     */
    ResponseDTO<List<PlatServCategoryDRO>> listByPlat(@NotNull(message = "plat不能为空") @Positive(message = "plat必须为大于0的正整数") @ApiParam(value = "平台", required = true) Integer plat);

}
